package com.lyj.system.domain.question.dto;

import jakarta.validation.constraints.*;
import lombok.Getter;
import lombok.Setter;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: LIUYANJIAO
 * Date: 2025-08-18
 * Time: 16:42
 */
@Getter
@Setter
public class QuestionAddDTO {

    @NotBlank(message = "标题不能为空")
    private String title;

    @NotNull(message = "难度等级不能为空")
    @Min(value = 1, message = "难度等级不能小于1")
    @Max(value = 3, message = "难度等级不能大于3")
    private Integer difficulty;

    @NotNull(message = "时间限制不能为空")
    @Positive(message = "时间限制必须为正数")
    private Long timeLimit;

    @NotNull(message = "空间限制不能为空")
    @Positive(message = "空间限制必须为正数")
    private Long spaceLimit;

    @NotBlank(message = "题目内容不能为空")
    private String content;

    @NotBlank(message = "测试用例不能为空")
    private String questionCase;

    @NotBlank(message = "默认代码不能为空")
    private String defaultCode;

    @NotBlank(message = "主函数名不能为空")
    private String mainFuc;
}
